import { createApp } from 'vue';  
import App from './App.vue';  
import { createRouter, createWebHistory } from 'vue-router';  
import { createPinia } from 'pinia';  
// import 'uno.css';  
import 'animate.css';  
import axios from 'axios';  
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import router from './router'  

// import '@/api/mock.js';

// 注册全局组件
// import api from '@/api/api'; 
// app.config.globalProperties.$api = api;


const app = createApp(App);  

// const routes = [];  
// const router = createRouter({  
//   history: createWebHistory(),  
//   routes,  
// });  

const pinia = createPinia();  

// app.use(router);  
app.use(pinia);  

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {  
  app.component(key, component);  
}  

const axiosInstance = axios.create({  
  baseURL: 'https://api.example.com/',  
});  

app.config.globalProperties.$axios = axiosInstance;  

app.use(router).mount('#app');